#include "chattextedit.h"

#include <QKeyEvent>

ChatTextEdit::ChatTextEdit(QWidget *parent)
    :QTextEdit(parent)
{
}

void ChatTextEdit::keyPressEvent(QKeyEvent *event){
        if(event->key()==Qt::Key_Return
           && !(event->modifiers() & Qt::ControlModifier)
           && !(event->modifiers() & Qt::ShiftModifier)){
            parent()->event(event);
        }
        else {
           QTextEdit::keyPressEvent( event );
        }

}





